package com.javafactroy.kunlong.data.iface;


import com.javafactroy.kunlong.base.dto.TQueryParam;
import com.javafactroy.kunlong.base.model.ReturnPageInfo;
import com.javafactroy.kunlong.client.feign.dto.PageInfoDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/*
 * @author： leijmdas
 * */
public interface IGeneralService<T extends PageInfoDto> {


    int save(T entity);

    int saveBatch(List<T> entities);

    int insert(T entity);

    int update(T entity);

    int updateNotNull(T entity);

    int deleteByPkeys(T entity);

    int deleteByPkey(Long pkey);

    int deleteBy(T entity);

    int selectCount(T entity);

    T selectByPkey(Long pkey);

    T selectByPkeys(T t);

    List<T> select(T e);

    List<T> selectAll();

    ReturnPageInfo<T> queryParam(@Param("queryParam") TQueryParam<T> queryParam);


    ReturnPageInfo<T> query(@Param("queryParam") T entity);

    long count(@Param("queryParam") T entity);

    // boolean checkSaveFlag();
}
